package org.dwell.nutzcow.book.ioc.event1;

import org.dwell.nutzcow.book.ioc.basic1.Teacher;
import org.nutz.ioc.Ioc;
import org.nutz.ioc.impl.NutIoc;
import org.nutz.ioc.loader.json.JsonLoader;

/**
 * Created by Jange on 2016/3/30.
 */
public class IocEventTest {

    public static void main(String[] args) {
        Ioc ioc = new NutIoc(new JsonLoader("order_events.js"));
        Order order = ioc.get(Order.class, "o1");
        ioc.get(Order.class, "o1");
        ioc.get(Order.class, "o1");
        System.out.println("fetch count : " + order.getFetchCount());
    }

}
